package cn.wolfcode.qo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class QueryObject {
    private int currentPage = 1;
    private int pageSize = 3;

    private String key;

    private int offset; // limit的第一个参数
    private int limit; // 每页显示的数据

    public int getStart(){
        return (currentPage - 1) * pageSize;
    }
}
